<html>
	{% include "../common_head.html" %}
	<body>
	{% include "../common_menus.html" %}
	
	
	<div id="content">
	
		<div id="rakontu_form_style" class="rakontu_form">
		<form action="/{{dir_visit}}/{{url_drafts}}?{{rakontu.urlQuery}}" method="post" enctype="multipart/form-data">
		
		{% if changes_saved %}
			<div class="message">{{template_changes_saved}}</div>
		{% endif %}
		
		{% if draft_entries %}
			<h3>{{template_draft}} {{template_entries|lower}}</h3>
	      	<table border="0" cellpadding="4" cellspacing="0" style="width:100%">
	      	<tr>
	      		<th>{{template_name_and_information_click_to_edit}}</th>
	      		<th>{{template_versions_click_to_use}}
	      			{{"text_versions"|info}} 
	      			{{"text_versions"|tip}}</th>
	      		<th width="80">{{template_remove}}?</th>
	      		</tr>
	      	{% for entry in draft_entries %}
		      	<tr>
				<td>
					<a href="{{entry.typeAsURL}}?{{entry.urlQuery}}" {{entry.getTooltipText}}>{{entry.title}}</a> 
					({{entry.typeForDisplay}})</p>
					<p>{{template_created}}: 
						{% if current_member.timeFormat %}
							{{entry.created|timeZone:member.timeZoneName|time:member.timeFormat}} 
						{% endif %}
						{{entry.created|timeZone:member.timeZoneName|date:member.dateFormat}}</p>
					<p>{{template_last_changed}}: 
						{% if current_member.timeFormat %}
							{{entry.edited|timeZone:member.timeZoneName|time:member.timeFormat}} 
						{% endif %}
						{{entry.edited|timeZone:member.timeZoneName|date:member.dateFormat}}</p>
					<p>{{template_additional_editors}}:
					{% if entry.additionalEditors %}
						{{entry.additionalEditorsListWithLinks}}
						(<a href="/{{dir_visit}}/{{url_editors}}?{{entry.urlQuery}}">{{template_change}}</a>)
					{% else %}
						{{template_none}}
						(<a href="/{{dir_visit}}/{{url_editors}}?{{entry.urlQuery}}">{{template_add_editors}} {{entry.typeForDisplay}}</a>)
					{% endif %}
					</p>
					{% if rakontu.allowsAttachments %}
						<p>{{template_attachments}}: 
						{% if entry.getAttachments %}
							{{entry.attachmentsListWithLinks}}
							(<a href="/{{dir_visit}}/{{url_attachments}}?{{entry.urlQuery}}">{{template_change_attachments}}</a>)
						{% else %}
							{{template_none}}
							(<a href="/{{dir_visit}}/{{url_attachments}}?{{entry.urlQuery}}">{{template_add_attachments}}</a>)
						{% endif %}
					{% endif %}
					</p>
				</td>
				<td>
					{% for version in entry.getTextVersionsInTimeOrder %}
						<a href="{{entry.typeAsURL}}?{{entry.urlQuery}}&{{version.urlQuery}}" {{version.getTooltipText}}>{{version.title}}</a>
						{% if current_member.timeFormat %}
							{{version.created|timeZone:member.timeZoneName|time:member.timeFormat}}
						{% endif %}
						{{version.created|timeZone:member.timeZoneName|date:member.dateFormat}}
						<input type="checkbox" name="remove|{{version.key}}" value="yes" id="remove|{{ version.key }}"/>
						<label for="remove|{{ version.key }}">{{template_remove}}</label>
						</p>
					{% endfor %}
					&nbsp;
					</td>
				<td><input type="checkbox" name="remove|{{entry.key}}" value="yes" id="remove|{{ entry.key }}"/>
					<label for="remove|{{ entry.key }}">{{template_remove}}</label></td>
				</tr>
			{% endfor %}
			</table>
		{% else %}
			{{blurbs|dictLookup:"no_drafts"}}
		{% endif %}

    {% if draft_entries  %}
    	<p></p>
    	<p><center><input type="submit" name="changeSettings|{{member.key}}" value="{{button_remove_selected_drafts}}" class="button"></center></p>
    {% endif %}
				
		{% if draft_entries_of_other_people_you_can_edit %}
		<h3>{{template_other_peoples_drafts_you_can_edit}}</h3>
	      	<table border="0" cellpadding="4" cellspacing="0" style="width:100%">
	      	<tr>
	      		<th>{{template_name_and_information_click_to_edit}}</th>
	      		<th>{{template_versions_click_to_use}} 
	      			{{"text_versions"|info}} 
	      			{{"text_versions"|tip}}</th>
	      		</tr>
	      	{% for entry in draft_entries_of_other_people_you_can_edit %}
		      	<tr>
		      	<td>
					<a href="{{entry.typeAsURL}}?{{entry.urlQuery}}" {{entry.getTooltipText}}>{{entry.title}}</a> 
					({{entry.typeForDisplay}})</p>
					<p>{{template_created_by}}: {{entry.creator.linkString}}</p>
					<p>{{template_created}}: 
						{% if current_member.timeFormat %}
							{{entry.created|timeZone:member.timeZoneName|time:member.timeFormat}} 
						{% endif %}
						{{entry.created|timeZone:member.timeZoneName|date:member.dateFormat}}</p>
					<p>{{template_last_changed}}: 
						{% if current_member.timeFormat %}
							{{entry.edited|timeZone:member.timeZoneName|time:member.timeFormat}} 
						{% endif %}
						{{entry.edited|timeZone:member.timeZoneName|date:member.dateFormat}}</p>
					<p>{{template_additional_editors}}: {{entry.additionalEditorsListWithLinks}}</p>
					{% if rakontu.allowsAttachments %}
						{% if entry.getAttachments %}
							(<a href="/{{dir_visit}}/{{url_attachments}}?{{entry.urlQuery}}">{{template_change_attachments}}</a>)
						{% else %}
							(<a href="/{{dir_visit}}/{{url_attachments}}?{{entry.urlQuery}}">{{template_add_attachments}}</a>)
						{% endif %}
					{% endif %}
				</td>
				<td>
					{% for version in entry.getTextVersionsInTimeOrder %}
						<p><a href="{{entry.typeAsURL}}?{{entry.urlQuery}}&{{version.urlQuery}}" {{version.text|upTo:current_member.shortDisplayLength|orNbsp}}>{{version.title}}</a>
						{% if current_member.timeFormat %}
							{{version.created|timeZone:member.timeZoneName|time:member.timeFormat}}
						{% endif %}
						{{version.created|timeZone:member.timeZoneName|date:member.dateFormat}}
						</p>
					{% endfor %}
					&nbsp;
					</td>
				</tr>
			{% endfor %}
			</table>
		{% endif %}
	</form>	
	</div>
	</div>
	{% include "../common_footer.html" %}
	</body>
</html>
